package tedu.study.ooday03extedns;

public class ExtendsDemo {
    public static void main(String[] args) {
        Person p = new Person();
        p.name = "zhangsan";
        p.age = 18;
        p.address = "HN";
        p.eat();
        p.sleep();

        Student s = new Student();
        s.name = "lisi";
        s.age = 21;
        s.address = "SH";
        s.stuId = "202212001";
        s.eat();
        s.sleep();
        s.study();

        Teacher t = new Teacher();
        t.name = "wangwu";
        t.age = 25;
        t.address = "TJ";
        t.salary = 1000.0;
        t.eat();
        t.sleep();
        t.teach();

        Doctor d = new Doctor();
        d.name = "zhaoliu";
        d.age = 31;
        d.address = "HB";
        d.level = "主治医师";
        d.eat();
        d.sleep();
        d.cut();
    }
}
